﻿#ifndef CSensorSeriesList_H
#define CSensorSeriesList_H
/********************************************************************************
** @ Date:2025/01/08
** @ Author: HanJiaXin
** @ Description:声振温算法仓列表卡片界面
** @ Version:1.0.0
** @ ClassName:CSensorSeriesList
** @ Fun:
********************************************************************************/
#include <QWidget>
#include <QTimer>
#include "ui_CSensorSeriesList.h"
#include "CDevSensorSeries.h"

class CSensorSeriesList : public QWidget
{
	Q_OBJECT

public:
	CSensorSeriesList(CDevSensorSeries* pDev, QWidget *parent = nullptr);
	~CSensorSeriesList();

private:
	void setStyleSheetFile();//设置样式表
	void initConnect();//初始化槽函数连接
	void setName();//设置控件名
	void setState(int nSensorSeriesState, int nChannel1, int nChannel2, int nChannel3, int nChannel4, int nChannel5, int nChannel6, int nChannel7, int nChannel8);

private slots:
	void slotDataRefresh();//定时器刷新
	void slotPushBtnChannelClicked();//通道号按钮点击槽函数
	void slotCfgChannged();

signals:
	void sigChannelClicked(QString sGuid);//按钮点击槽函数，上层根据返回的Guid判断点击的是哪个设备的哪个通道

private:
	Ui::CSensorSeriesListClass ui;
	QString m_sNormalLamp;//指示灯灭样式表字符串
	QString m_sWorkLamp;//指示灯绿灯样式表字符串
	QString m_sAlarmLamp;//指示红灯样式表字符串
	QString m_sWarningLamp;//指示黄灯样式表字符串
	QTimer* m_pTimer;//定时查询状态
	CDevSensorSeries* m_pDev;
	CDevDataSensorSeries* m_pDevData;
};

#endif